import request from '@/utils/request'

export function allUserList (query)  {
  return request({
    url: 'user/list',
    method: 'get',
    params: query
  })
}
// 删除用户
export function deleteUser(id) {
  return request({
    url: 'user/deleteUser/' + id,
    method: 'delete'
  })
}


// 修改用户
export function updateUser(data) {
  return request({
    url: '/user/updateUser',
    method: 'put',
    data: data
  })
}

export function addUser (data)  {
  return request({
    url: 'user/insertUser',
    method: 'post',
    data: data
  })
}

// 用户状态修改
export function changeUserStatus(id, status) {
  return request({
    url: '/user/changeStatus',
    method: 'get',
    params:
      {
        id: id,
        status: status
      }
  })
}
